package a17_Reflection.Test.Constructor;

import java.io.IOException;
import java.security.PublicKey;

/**
 * @Author quan
 * @Description TODO
 * @Date 2023/5/4 10:11
 */
public class Student3 {
    private int age;
    private int name;
    //空参构造
    public Student3() {
    }
    //有两个参数的有参构造
    public Student3(int age, int name) {
        this.age = age;
        this.name = name;
    }
    //sleep方法
    public void sleep(){
        System.out.println("睡觉");
    }
    //带一个参数的eat方法
    private String eat(String something) throws IllegalAccessException, IOException {
        System.out.println("在吃"+something);
        return "吃饱了好困~";
    }
    //带两个参数的eat方法
    private void eat(String something, int a){
        System.out.println("在吃"+something);
    }
    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getName() {
        return name;
    }

    public void setName(int name) {
        this.name = name;
    }
}
